
<!--

	ICERRR
	
	https://code.google.com/p/icerrr/
	
	The MIT License (MIT)

	Copyright (c) 2014 REJH Gadellaa
	
	Permission is hereby granted, free of charge, to any person obtaining a copy
	of this software and associated documentation files (the "Software"), to deal
	in the Software without restriction, including without limitation the rights
	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	copies of the Software, and to permit persons to whom the Software is
	furnished to do so, subject to the following conditions:
	
	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.
	
	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	THE SOFTWARE.
	

--> 

<!doctype html>

<html lang="en">

<head>
	
    <meta charset="utf-8">
	
    <!-- Title + Info -->
    <title>ICERRR</title>
    
    <meta name="title" content="ICERRR" />
    <meta name="description" content="The html5(ish) icecast streaming app">
	<meta name="author" content="REJH Gadellaa">
    
    <!-- Meta -->
    <meta content="True" name="HandheldFriendly" />
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
	
	<!-- Javascript: jQuery -->
    <script language="javascript" type="text/javascript" src="js/jquery/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" language="javascript" src="js/jquery/jquery.longclick-simple.js"></script>
	
	<!-- Javascript: Other -->
    <script language="javascript" type="text/javascript" src="js/plugs/json2.js"></script>
    <script language="javascript" type="text/javascript" src="js/plugs/masonry.pkgd.min.js"></script>
    <script type="text/javascript" language="javascript" src="js/plugs/dateformat.js"></script>
    <script type="text/javascript" language="javascript" src="js/plugs/smoothie.js"></script>
    <script type="text/javascript" language="javascript" src="js/plugs/min/todataurl.js"></script>
    
    <!-- Javascript : Cordova -->
    <script language="javascript" type="text/javascript" src="js/cordova/cordova-2.7.0.js"></script>
    <script language="javascript" type="text/javascript" src="js/cordova/chrome.cast.js"></script>
    <script language="javascript" type="text/javascript" src="js/cordova/webintent.js"></script>
    <script language="javascript" type="text/javascript" src="js/cordova/mediastreamer.js"></script>
    <script language="javascript" type="text/javascript" src="js/cordova/notifmgr.js"></script>
    <script language="javascript" type="text/javascript" src="js/cordova/alarmmgr.js"></script>
    
    <!-- Javascript: Externals || TODO: would rather not rely on online files... -->
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
	
	<!-- Javascript: icerrr -->
    <script language="javascript" type="text/javascript" src="js/site.base.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.alarms.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.chedit.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.chicon.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.chlist.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.cast.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.chsearch.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.config.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.helpers.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.home.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.install.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.lifecycle.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.logger.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.mediaplayer3.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.storage.js"></script>
	<script language="javascript" type="text/javascript" src="js/site.ui.js"></script>
    <script language="javascript" type="text/javascript" src="js/site.webapi.js"></script>
        
    <!-- Style / base -->
    <link rel="stylesheet" type="text/css" href="css/default.css" />
    <link rel="stylesheet" type="text/css" href="css/add.cast.css" />
    
    <!-- Style / responsive -->
    <link rel="stylesheet" type="text/css" href="css/size.phone.css" media="screen and (max-width: 480px)" />
    
    <!-- Webfonts -->
    <link href='http://fonts.googleapis.com/css?family=Roboto:100,200,300,400' rel='stylesheet' type='text/css'>
	
</head>

<body onResize="site.lifecycle.onResize();">

<!-- Section -->
<section id="splash">
	<div class="center_table">
	<div class="center_td">
		<img src="img/web_hi_res_512_001.png" />	</div>
	</div>
</section>

<!-- Install -->
<section id="install">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app"><img src="img/icons-48/ic_launcher.png" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">        </div>
    </div>
    
    <div class="main">
    	<div class="log"><strong>Installing...</strong></div>
    </div>
</section>

<!-- Section -->
<section id="firstlaunch"></section>

<!-- Section: Home -->
<section id="home">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app"><img src="img/icons-48/ic_launcher.png" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
        	<!-- <div class="action activatablel" onClick="site.ui.showtoast('It\'s just a placeholder :)')";><img src="img/icons-48/ic_action_core_overflow.png" /></div> -->
            <div class="action activatablel"><img class="cast_icon cast_unavailable" onClick="site.cast.requestSession();" src="img/icons-48/D0D102.jpg" /></div>
        </div>
    </div>
    
    <div class="main">
		<div class="station_image"><div class="station_image_wrap round4 shadow_z1"><div class="center_table"><div class="center_td"><img /></div></div></div></div>
		<div class="station_name">...</div>
        <div class="station_nowplaying">...</div>
	</div>
    
    <div class="footer shadow_z1u">
    	<div class="button left activatablel" onClick="site.alarms.init();">
			<div class="button_inner">
            	<div class="center_table"><div class="center_td">ALARMS</div></div>
            </div>
		</div>
    	<div class="button center activatablel" id="home_play" onClick="site.home.mpPlayToggle();$(this).toggleClass('busy');">
			<div class="button_inner">
				<div class="center_table"><div class="center_td"><img src="img/icons-96/ic_play_w.png" /></div></div>
			</div>
		</div>
		<div class="button right activatablel" onClick="site.chlist.init();">
			<div class="button_inner">
            	<div class="center_table"><div class="center_td">STATIONS</div></div>
            </div>
		</div>
    </div>
</section>

<!-- Section -->
<section id="channellist">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app  activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
            <div class="action activatablel" onClick="site.chsearch.init();">
				<img src="img/icons-48/ic_add_green.png" />
			</div>
        </div>
    </div>
    
    <div class="tabbar shadow_z1">
    	<div class="tab activatablel stations active" onClick="site.chlist.ontabclick(this)">
        	<div class="center_table"><div class="center_td">All stations</div></div>
        </div>
    	<div class="tab activatablel starred" onClick="site.chlist.ontabclick(this);">
        	<div class="center_table"><div class="center_td">Starred</div></div>
        </div>
    </div>
    
    <div class="main">
		
    </div>

</section>

<!-- Section -->
<section id="editstation">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
			<div class="action save activatablel" onClick="site.chedit.check();">
				<img src="img/icons-48/ic_save_green.png" />
			</div>
            <div class="action trash activatablel" onClick="site.chedit.remove();">
				<img src="img/icons-48/ic_trash_green.png" />
			</div>
        </div>
    </div>
    
    <div class="main">
	
		<div class="block header">
			Add/Edit station
        </div>
		
		<div class="block data1">
		
			<form onSubmit="site.chedit.check(); return false;">
		
			<input type="hidden" name="station_id" value="" />
			
			<p><label>Station url: <span style="color:#f00;">*</span></label>
				<input class="round2" type="text" name="station_url" placeholder="http://www.host.com/path-to-stream" />
			</p>
			
			<p><label>Station name: <span style="color:#f00;">*</span></label>
				<input class="round2" type="text" name="station_name" placeholder="My Radio Station" />
			</p>
			
			<p><label>Station icon: <a href="javascript:void;" onClick="site.ui.showtoast('One moment...');site.chedit.searchicon();">Google it</a></label>
				<input class="round2" type="text" name="station_icon" placeholder="http://www.host.com/path-to-icon.png" />
			</p>
			
			<p><img class="station_icon" src="img/icons-48/ic_launcher.png" /></p>
		
			</form>
			
		</div>
		
		<div class="block data2">
		
		</div>
		
    </div>
	
</section>

<!-- Section -->
<section id="searchstation">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
			<div class="action save activatablel" onClick="site.chsearch.searchstation();">
				<img src="img/icons-48/ic_search_green.png" />
			</div>
        </div>
    </div>
    
    <div class="main">
	
		<div class="block header">
			Search station
        </div>
		
		<div class="block data1">
		
			<form onSubmit="site.chsearch.searchstation(); return false;">
			
			<p><label>Station name: <span style="color:#f00;">*</span></label>
				<input class="round2" type="text" name="station_search" placeholder="Ex: BBC Radio 1" />
			</p>
            
            <p>&nbsp;</p>
			
			<p>Can't find your station but you know how to get hold of the stream url? Consider <a href='javascript:void' onClick="window.open('http://dirble.com/','_system');">signing up for a Dirble account</a> and add it to the database!</p>
            
            <p>Or add a station <a href="javascript:void;" onClick="loggr.log(site.lifecycle.remove_section_history_item('#searchstation'));site.chedit.init();">manually</a></p>
			
			</form>
			
		</div>
		
		<div class="resultfooter shadow_z1u">
			<a href='javascript:void' onClick="window.open('http://dirble.com/','_system');">Powered by Dirble</a>
		</div>
	
    </div>

</section>

<!-- Section -->
<section id="searchstation_results">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
			
        </div>
    </div>
    
    <div class="main">
	
    </div>

</section>

<!-- Section -->
<section id="searchicon">
	
    <div class="actionbar shadow_z1">
    	
        <div class="icon_app activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
			
        </div>
    </div>
    
    <div class="main">
	
    </div>

</section>

<!-- Section -->
<section id="alarms">

	<div class="actionbar shadow_z1">
    	
        <div class="icon_app activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
            <div class="action activatablel" onClick="site.alarms.add();">
				<img src="img/icons-48/ic_add_green.png" />
			</div>
        </div>
    </div>
    
    <div class="main">
	
    </div>
    
</section>

<!-- Section -->
<section id="alarms_add">

	<div class="actionbar shadow_z1">
    	
        <div class="icon_app activatablel"><img src="img/icons-48/ic_arrow_back.png" onClick="site.lifecycle.onBackButton();" /></div>
        <div class="title">ICERRR</div>
        
		<div class="actions">
			<div class="action save activatablel" onClick="site.alarms.save();">
				<img src="img/icons-48/ic_save_green.png" />
			</div>
            <div class="action trash activatablel" onClick="site.alarms.remove();">
				<img src="img/icons-48/ic_trash_green.png" />
			</div>
        </div>
    </div>
    
    <div class="main">
		
        <div class="block header">
			Set alarm
        </div>
		
		<div class="block data1">
		
			<form onSubmit="return false;">
			
			<p><label>Station:</label><br>
				<select name="alarm_station_name"></select>
			</p>
            
            <p><label>Time:</label><br>
            	<input type="time" name="alarm_time" />
            </p>
            
            <p><label>Repeat:</label><br>
            	<input type="checkbox" name="repeat" />
            </p>
            
            <p><label>Repeat days:</label><br>
            	<input type="checkbox" name="repeat_0" id="repeat_sun" class="repeat_day activatablel" /> <label class='day'>Sunday</label><br>
            	<input type="checkbox" name="repeat_1" id="repeat_mon" class="repeat_day activatablel" /> <label class='day'>Monday</label><br>
            	<input type="checkbox" name="repeat_2" id="repeat_tue" class="repeat_day activatablel" /> <label class='day'>Tuesday</label><br>
            	<input type="checkbox" name="repeat_3" id="repeat_wed" class="repeat_day activatablel" /> <label class='day'>Wednesday</label><br>
            	<input type="checkbox" name="repeat_4" id="repeat_thu" class="repeat_day activatablel" /> <label class='day'>Thurday</label><br>
            	<input type="checkbox" name="repeat_5" id="repeat_fri" class="repeat_day activatablel" /> <label class='day'>Friday</label><br>
            	<input type="checkbox" name="repeat_6" id="repeat_sat" class="repeat_day activatablel" /> <label class='day'>Saturday</label><br>
            </p>
            
            <p>&nbsp;</p>
			
			</form>
			
		</div>
        
    </div>
    
</section>

<!-- Section -->
<section id="help"></section>

<!-- Section -->
<section id="about"></section>

<!-- Overlay: Loading -->
<div id="loading" class="overlay_wrap">
	<div class="center_table">
	<div class="center_td">
		<div class="message">mmrRRMZzz</div>
	</div>
	</div>
</div>

<!-- Overflow_Menu -->
<div id="overflow_menu" class="overflow_menu shadow_z2">
	<div class="menu_item">Settings</div>
</div>

<!-- Overlay: Dialog -->
<div id="dialog" class="overlay_wrap"></div>

<!-- Overlay: Toast -->
<div id="overlay_toast" class="round4">Toast!</body>

<!-- Script: init! -->
<script>
site.lifecycle.init();
</script>

</body>

</html>